<template>
    <div>
        <ul >
            <li v-for="(item, index) in arr" :key="index">{{ item.name }}</li>
        </ul>
    </div>
</template>

<script setup>
import axios from "axios"
import {ref} from 'vue'


const arr=ref([])
 
axios.get('/data.json').then((res) => {
   arr.value=res.data
})
</script>

<style lang="scss" scoped>
li{
    list-style: none;
    background: #ccc;
}
</style>